﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<TITLE>访问记录列表</TITLE> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="${pageContext.request.contextPath }/css/Style.css" type=text/css rel=stylesheet>
<LINK href="${pageContext.request.contextPath }/css/Manage.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/web.js"></script>
<SCRIPT language=javascript>
	function toPage(page){
		if(page){
			$("#page").val(page);
		}
		document.saleVisitForm.submit();		
	}
	function changePageSize(pageSize){
		document.saleVisitForm.submit();
	}
	$(document).ready(function() {
		$("#select").click(function() {
			openWindow("${pageContext.request.contextPath}/CustomerAction_list?select=true","选择客户",800,400);
		});
	});	
</SCRIPT>

<META content="MSHTML 6.00.2900.3492" name=GENERATOR>
</HEAD>
<BODY>		
	<FORM id="saleVisitForm" name="saleVisitForm"
		action="${pageContext.request.contextPath }/SaleVisitAction_list"
		method=post>	
		<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
			<TBODY>
				<TR>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_019.jpg" border=0></TD>
					<TD width="100%" background="${pageContext.request.contextPath }/images/new_020.jpg" height=20></TD>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_021.jpg" border=0></TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
			<TBODY>
				<TR>
					<TD width=15 background=${pageContext.request.contextPath }/images/new_022.jpg>
					<IMG src="${pageContext.request.contextPath }/images/new_022.jpg" border=0></TD>
					<TD vAlign=top width="100%" bgColor=#ffffff>
						<TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
							<TR>
								<TD class=manageHead>当前位置：访问记录管理 &gt; 记录列表</TD>
							</TR>
							<TR>
								<TD height=2></TD>
							</TR>
						</TABLE>
						<TABLE borderColor=#cccccc cellSpacing=0 cellPadding=0
							width="100%" align=center border=0>
							<TBODY>
								<TR>
									<TD height=25>	
										<TABLE cellSpacing=0 cellPadding=2 border=0>
											<TBODY>
												<TR>
													<TD>拜访客户：</TD>
													<TD>
														<input type="hidden" name="customer.cust_id" id="cust_id" value="${param['customer.cust_id']}" />
														<INPUT class=textbox style="WIDTH: 80px" maxLength=50 name="cust_name" id="cust_name" value="${param['cust_name']}" >
														<input type="button" id="select" value="选择"/>
													</TD>													
													<TD><INPUT class=button id=sButton2 type=submit value=" 筛选 " name=sButton2></TD>
												</TR>
											</TBODY>
										</TABLE>
									</TD>
								</TR>							    
								<TR>
									<TD>
										<TABLE id=grid
											style="BORDER-TOP-WIDTH: 0px; FONT-WEIGHT: normal; BORDER-LEFT-WIDTH: 0px; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #cccccc; WIDTH: 100%; BORDER-TOP-COLOR: #cccccc; FONT-STYLE: normal; BACKGROUND-COLOR: #cccccc; BORDER-RIGHT-WIDTH: 0px; TEXT-DECORATION: none; BORDER-RIGHT-COLOR: #cccccc"
											cellSpacing=1 cellPadding=2 rules=all border=0>
											<TBODY>
												<TR style="FONT-WEIGHT: bold; FONT-STYLE: normal; BACKGROUND-COLOR: #eeeeee; TEXT-DECORATION: none">
													<TD>业务员名称</TD>
													<TD>客户名称</TD>
													<TD>访问时间</TD>
													<TD>访问人</TD>
													<TD>访问地址</TD>
													<TD>访问详情</TD>
													<TD>下次访问时间</TD>
													<TD>操作</TD>
												</TR>
												<s:iterator value="#pageBean.list" >
												<TR style="FONT-WEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: white; TEXT-DECORATION: none">
													<TD><s:property value="user.user_name" /></TD>
													<TD><s:property value="customer.cust_name" /></TD>
													<TD><s:property value="visit_time_txt" /></TD>
													<TD><s:property value="visit_interviewee" /></TD>
													<TD><s:property value="visit_addr" /></TD>
													<TD><s:property value="visit_detail" /></TD>
													<TD><s:property value="visit_nexttime_txt" /></TD>
													<TD>
														<a href="${pageContext.request.contextPath }/SaleVisitAction_toEdit?visit_id=<s:property value="visit_id" />">修改</a>
														&nbsp;&nbsp;
														<a href="${pageContext.request.contextPath }/SaleVisitAction_delete?visit_id=<s:property value="visit_id" />" onclick="return confirm('确认删除吗？')">删除</a>
													</TD>
												</TR>
												</s:iterator>
											</TBODY>
										</TABLE>
									</TD>
								</TR>								
								<TR>
									<TD><SPAN id=pagelink>
											<DIV style="LINE-HEIGHT: 20px; HEIGHT: 20px; TEXT-ALIGN: right">
												共[<B><s:property value="#pageBean.totalCount"/></B>]条记录,[<B><s:property value="#pageBean.totalPage"/></B>]页
												,每页显示
												<select name="pageSize" onchange="changePageSize($(this).val())">												
												<option value="2" <s:property value="#pageBean.pageSize==2?'selected':''"/>>2</option>
												<option value="10" <s:property value="#pageBean.pageSize==10?'selected':''"/>>10</option>
												</select>
												条
												[<s:if test="#pageBean.currentPage==1">前一页</s:if><s:else><A href="javascript:void(0)" onclick="toPage(<s:property value='#pageBean.currentPage-1'/>)">前一页</A></s:else>]
												<B><s:property value="#pageBean.currentPage"/></B>
												[<s:if test="#pageBean.currentPage==#pageBean.totalPage">后一页</s:if><s:else><A href="javascript:void(0)" onclick="toPage(<s:property value='#pageBean.currentPage+1'/>)">后一页</A></s:else>] 
												到
												<input type="text" size="3" id="page" name="currentPage" value="<s:property value="#pageBean.currentPage"/>"/>
												页										
												<input type="button" value="Go" onclick="toPage($('#page').val())"/>
											</DIV>
									</SPAN></TD>
								</TR>
							</TBODY>
						</TABLE>
					</TD>
					<TD width=15 background="${pageContext.request.contextPath }/images/new_023.jpg">
						<IMG src="${pageContext.request.contextPath }/images/new_023.jpg" border=0></TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
			<TBODY>
				<TR>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_024.jpg" border=0></TD>
					<TD align=middle width="100%" background="${pageContext.request.contextPath }/images/new_025.jpg" height=15></TD>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_026.jpg" border=0></TD>
				</TR>
			</TBODY>
		</TABLE>
	</FORM>
</BODY>
</HTML>
